home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Floppyshop 2
/
Floppyshop - 2.zip
/
Floppyshop - 2.iso
/
art&graf.ix
/
art-4542
/
morph
/
morph.doc
< prev
next >
Wrap
Text File
|
1994-05-06
|
7KB
|
181 lines
________________________________
/ \
| morphMorphMOrphMORphMORPhMORPH |
\________________________________/
============= =============
_____________ BY ____________
/ \
| The Butter-Fingered Juggler |
\_____________________________/
===========================
Have you ever marvelled at the special effects in Terminator 2 ? Or the
ads on television where a car changes into a horse ? These are examples of
an animation technique called Morphing.
QUICKSTART
==========
The basic idea behind morphing is that points on one image are moved to
corresponding points on another image. This program loads 2 Degas format
pictures and displays a mesh of points over each image.
The points can moved about using the mouse. When the left mouse button is
pressed, the nearest point to the mouse will be moved to the mouse
position. The point can be dragged around as long as the button is held
down.
The corresponding point on the other image will be highlighted. Once the
points have been arranged to your own personal tastes, press M to start
the morphing process. Enter the number of frames - 20 will fit on one disk
and give reasonably smooth effects.
The program generates Degas format screens from FRAME001 to the number of
frames entered. These can then be taken into an animation package (such as
ANIMTOOL by Thrax), an art package or a slideshow for displaying.
DETAILED GUIDE
==============
The quickstart will produce morphs, but better results can be obtained
using the other parts of the program. The functions of the keys
are listed below.
F1 - Displays both images on screen to allow you to match points when
editing.
F2 - Displays the first image as a full screen picture. This allows
for fine postioning of the mesh points.
F3 - Displays the second image for detailed editing.
F4 - Increases the colour of the mesh. Changing the colour of the mesh
will allow you to see it more clearly particularly if the mesh
is the same colour as the image where you are editing.
F5 - Decreases the colour of the mesh.
M - Start the morphing process. Enter the number of frames to
generate between the start and end images.
W - Change the width of the mesh. A finer mesh will make a smoother
animation, but it is more difficult to position the
correspondence points unless the images are similar.
WARNING - This will destroy the current mesh.
S - Save the current mesh information. The meshes are saved as
using the names of the images. I would recommend saving regularly
particularly if you are working on a fine mesh in case you make
a mess of it.
L - Load saved meshes. This will load a new mesh for both screens.
HELP - will show the above information.
ESC - To quit from the program
HINTS ON USE
============
The quality of the morph depends on the positioning of the mesh points. If
a particular area of the images is not morphing very well, try moving the
mesh points to different areas. Detailed areas should have more mesh
points in them than less detailed areas. Avoid crossing mesh points.
If you have a mesh 'square' at the same point on both images then
you will only get a cross fade between them. It is better to move the
points on one of the meshes as this will produce some movement which
will help to conceal the cross fading.
For best results use similar images drawn from the same view point. For
example a girl's face and an old lady's face.
The more frames you generate, the smoother the animation will be. A normal
disk should be able to hold 20 frames + the start and end frames.
For more detailed work you may find it better to keep flipping from screen
1 to screen 2 using F2 / F3 instead of displaying both images on screen
simultaneously.
It is possible to morph between 2 dissimilar images but this requires much
more time and patience. One method of doing this is to do a crude morph of
3 or 4 frames using large mesh. Take the resulting images into an art
package and tidy them up (using a large amount of artistic licence !).
Use each of the intermediate images as the start and end frames in the
morph and do a fine morph between each set.
REGISTRATION
============
This program is shareware. You are free to copy this program, provided
that the documentation accompanies it. If you enjoy using it you can
register it by either sending some interesting pictures and their meshes,
or by sending me 5 pounds ( or if you're feeling generous then send both !)
I'd like to get together a collection of the best morphs to send to
registered users. Registered users will also get version 2 sent to them
when it is available. This will contain any bug fixes and any reasonable
request for changes.
Changes currently being considered include different methods of fading
between the frames and colour morphing between different palettes.
At the moment the palette is taken from the second image loaded.
Please send any donations to
Karl Manning
206 Foundry Lane
Shirley
Southampton
Hants
SO1 3JX
ABOUT MORPH
===========
This program was inspired by an article in Dr Dobb's Journal #202 July
1993 ( its an American progammer's magazine which my local newsagent has
suddenly decided to stock.)
That had a couple of articles on graphics in general and included a
complete source listing of a morph algorithm as used by Industrial Light
and Magic - one of the best computer animation companies.
The listing was in 'C' and with a few "minor" changes (like adding in 2
subroutines they had missed out !) I got it to compile. I decided to write
the mesh editor in assembler simply because I'm a lousy C programmer !
The editor worked fine, but I couldn't generate files in the format
required by the C program. ( It uses some of the 'sloppiness' of C
to load everything, and required that all mesh coords be floating
point - why when a screen is by definition integer coords ?)
I gave up trying to interface the two programs and instead converted
( a very laborious process ) the C listing into assembler. However when
it came to debugging I failed because I couldn't understand what the
algorithm was supposed to be doing. I mean what exactly is a CatMullRom
spline ? ( No I don't really want to know ! )
In the end I wrote the morphing section from scratch and several debugging
cycles later it worked.
The source codes for this are available for a fee of 5 pounds - this
includes the original C program as listed in the magazine, my attempt
at writing it in assembler and the final version.
I make no claims about the software as written other than it seems to work.
That said, it seems to work ok for me !
Enjoy !
1/2/94
Karl Manning, The Butter-Fingered Juggler